package cn.com.qtgl.apis.builtin.comp.proxy;

import cn.com.qtgl.apis.builtin.comp.BuiltinConfig;
import cn.com.qtgl.apis.builtin.comp.SystemBuiltinConfig;
import cn.com.qtgl.apis.builtin.model.vo.*;
import cn.com.qtgl.apis.builtin.model.vo.app_preference.AppPreference;
import cn.com.qtgl.apis.builtin.model.vo.department.DepartmentConnection;
import cn.com.qtgl.apis.builtin.model.vo.post.PostConnection;
import cn.com.qtgl.apis.builtin.model.vo.services.Service;
import cn.com.qtgl.apis.builtin.model.vo.tenant_preference.TenantPreference;
import cn.com.qtgl.apis.builtin.model.vo.user.UserConnection;
import cn.com.qtgl.apis.builtin.model.vo.user_preference.UserPreference;
import cn.melonlib.apis.support.annos.ApiModule;
import cn.melonlib.apis.support.annos.ApiParameter;
import cn.melonlib.apis.support.annos.ApiRequest;
import cn.melonlib.objects.maps.JsonMap;

import java.util.List;

@ApiModule(
        value = "systemBuiltin",
        apiModuleConfig = SystemBuiltinConfig.CONFIG_NAME
)
public interface SystemBuiltinProxy {


    @ApiRequest
    IamUser me();

    @ApiRequest
    List<CanvasMenu> canvasmenus(
            @ApiParameter(name = "filter",type = "Filter",required = false) JsonMap<Object> filter
            );
    @ApiRequest
    List<CanvasMenu> canvasmenus();

    @ApiRequest
    List<Service> services();

    @ApiRequest
    List<Service> services(
            @ApiParameter(name = "id",type = "ID",required = false) String id);

    @ApiRequest
    List<Service> services(
            @ApiParameter(name = "filter",type = "Filter",required = false) JsonMap<Object> filter);

    @ApiRequest
    List<Service> services(
            @ApiParameter(name = "id",type = "ID",required = false) String id,
            @ApiParameter(name = "filter",type = "Filter",required = false) JsonMap<Object> filter);

    @ApiRequest
    TenantPreference tenantPreference();

    @ApiRequest
    AppPreference appPreference();

    @ApiRequest
    UserPreference userPreference();

    @ApiRequest
    BusinessDomain businessDomains();


    /**
     * 用户数据查询
     * @param filter
     * @return
     */
    @ApiRequest(name = "users")
    public UserConnection users(@ApiParameter(name = "filter",type = "Filter") JsonMap<JsonMap<Object>> filter);

    @ApiRequest(name = "users")
    public UserConnection users();

    @ApiRequest(name = "users")
    public UserConnection users(@ApiParameter(name = "id",type = "ID") String id);

    @ApiRequest(name = "users")
    public UserConnection users(
            @ApiParameter(name = "first",type = "Int") Integer first,
            @ApiParameter(name = "offset",type = "Int") Long offset,
            @ApiParameter(name = "filter",type = "Filter") JsonMap<JsonMap<Object>> filter
    );

    /**
     * 岗位信息查询
     * @return
     */
    @ApiRequest
    public PostConnection posts();

    @ApiRequest
    public PostConnection posts(@ApiParameter(name = "first",type = "Int") Integer first,
                                @ApiParameter(name = "offset",type = "Int") Long offset,
                                @ApiParameter(name = "filter",type = "Filter") JsonMap<JsonMap<Object>> filter);

    /**
     * 部门信息查询
     * @return
     */
    @ApiRequest
    public DepartmentConnection departments();

    @ApiRequest
    public DepartmentConnection departments(@ApiParameter(name = "filter",type = "Filter") JsonMap<JsonMap<Object>> filter);

    @ApiRequest
    public DepartmentConnection departments(
            @ApiParameter(name = "first",type = "Int") Integer first,
            @ApiParameter(name = "offset",type = "Int") Long offset,
            @ApiParameter(name = "filter",type = "Filter") JsonMap<JsonMap<Object>> filter);

    @ApiRequest
    public IamTenant tenantConfig();

    @ApiRequest
    public Version version();
}
